//package cn.benben.dubbo.filter;
//
//import cn.benben.core.constant.SecurityConstants;
//import cn.benben.core.context.SecurityContextHolder;
//import cn.benben.core.utils.StringUtils;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.dubbo.common.constants.CommonConstants;
//import org.apache.dubbo.common.extension.Activate;
//import org.apache.dubbo.rpc.*;
//
///**
// * @author xn
// * 数据透传
// */
//
//
//@Slf4j
//@Activate(group = {CommonConstants.PROVIDER})
//public class RpcProviderFilter implements Filter {
//
//    @Override
//    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
//        log.info("RpcProviderFilter------");
//        SecurityContextHolder.setUserId(invocation.getAttachment(SecurityConstants.USER_ID));
//        SecurityContextHolder.setUserName(invocation.getAttachment(SecurityConstants.USER_NAME));
//        log.info(invocation.getAttachment(SecurityConstants.USER_NAME));
//        return invoker.invoke(invocation);
//    }
//}
